import request from '/@/utils/request';
export const getList = (query: any) =>
	request({
		url: '/upms/sysregion/list',
		method: 'get',
		params: query,
	});

export const getLazyTree = (parentCode:any, params:any) => {
  return request({
    url: '/upms/sysregion/lazy-tree',
    method: 'get',
    params: {
      ...params,
      parentCode
    }
  })
}

export const getDetail = (code:any) => {
  return request({
    url: '/upms/sysregion/detail',
    method: 'get',
    params: {
      code
    }
  })
}

export const remove = (id:any) => {
  return request({
    url: '/upms/sysregion/remove',
    method: 'post',
    params: {
      id,
    }
  })
}

export const submit = (row:any) => {
  return request({
    url: '/upms/sysregion/submit',
    method: 'post',
    data: row
  })
}
